package com.qyhl.school.school.vlog.play;


import com.qyhl.webtv.commonlib.entity.school.SchoolVlogBean;

import java.util.List;

public class SchoolVlogPlayPresenter implements SchoolVlogPlayContract.SchoolVlogPlayPresenter {
    private SchoolVlogPlayModel mModel;
    private SchoolVlogPlayContract.SchoolVlogPlayView mView;

    public SchoolVlogPlayPresenter(SchoolVlogPlayContract.SchoolVlogPlayView mView) {
        this.mView = mView;
        this.mModel = new SchoolVlogPlayModel(this);
    }

    @Override
    public void getDetail(int vlogId, String username) {
        mModel.getDetail(vlogId, username);
    }

    @Override
    public void doPraise(int vlogId, String username) {
        mModel.doPraise(vlogId, username);
    }

    @Override
    public void cancelPraise(int vlogId, String username) {
        mModel.cancelPraise(vlogId, username);
    }

    @Override
    public void doShare(int vlogId) {
        mModel.doShare(vlogId);
    }

    @Override
    public void setDetail(SchoolVlogBean bean) {
        mView.setDetail(bean);
    }

    @Override
    public void setError(String msg) {
        mView.setError(msg);
    }

    @Override
    public void setPraiseSuccess(boolean isAdd, String msg) {
        mView.setPraiseSuccess(isAdd, msg);
    }

    @Override
    public void setPraiseError(String msg) {
        mView.setPraiseError(msg);
    }

    @Override
    public void getData(int tagId, int lastId, int lastBoost) {
        mModel.getData(tagId, lastId, lastBoost);
    }

    @Override
    public void setData(List<SchoolVlogBean> beanList) {
        mView.setData(beanList);
    }

    @Override
    public void setDataError(String msg) {
        mView.setDataError(msg);
    }

    @Override
    public void shareSuccess() {
        mView.shareSuccess();
    }
}
